{% extends 'VentureFinishedProductBundle::layout.html.twig' %}

{% block title %}Finished Product Details{% endblock%}

{% block main %}
    {{ parent() }}

<div class="cont font-check">
    <h2 class="heading"> {{ "finished products"| upper }}: {{ finishedProduct['itemNumber'] | upper }}: {{ finishedProduct['itemName'] | upper }}</h2>
    
    <h4 class="desc-cont">Description: {{ finishedProduct['itemDescription'] }}</h4>
    
    <div class="row-cont">
        <div class="row">
            <p class="left-side">Packaging: {{ finishedProduct['configPackaging'] }}</p>
            <p class="right-side">Quoting cost: {{ finishedProduct['quotingCost'] }}</p>
        </div>
    
        <div class="row">
            <p class="left-side">Tags: {{ finishedProduct['tags'] }}</p>
            <p class="right-side">Lowest cost: {{ finishedProduct['lowestCost'] }}</p>
        </div>
            
    </div>
    
    <div class="property-cont">
        <h4 class="desc-cont no-brd">Sales Price Points:</h4>
        
        <div class="property-row">
            <p>Standard Price</p>
            {% if finishedProduct['standardCost'] is defined %}
            <p>{{ finishedProduct['standardCost'] }}</p>
            {% else %}
            <p>0.00</p>
            {% endif %}
        </div>
        
        {% if finishedProduct['salesPointCosts'] is defined %}
        {% for spCost in finishedProduct['salesPointCosts'] %}
        <div class="property-row">
            <p>{{ spCost['salesCostPoint'] }}</p>
            <p>{{ spCost['cost'] }}</p>
        </div>
        {% else %}
        <div class="property-row">
            <p class="single">There are no special price points listed</p>
        </div>
        {% endfor %}
        {% endif %}
    </div>
    
    <div class="property-cont">
        <h4 class="desc-cont no-brd">Properties:</h4>
            {% for property in finishedProduct['properties'] %}
            <div class="property-row">
                <p>{{ property['property']}}</p>
                <p>{{ property['specification'] }}&nbsp;{{ property['specificationMath'] }}</p>
                <p>{{ property['testProcedure'] }}</p>
            </div>
            {% else %}
            <div class="property-row">
                <p class="single">There is no property listed</p>
            </div>
            {% endfor %}
    </div>
    
    <div class="property-cont">
        <h4 class="desc-cont no-brd">Formula:</h4>
            {% for formula in finishedProduct['formulas'] %}
            <div class="property-row">
                {% if formula['rawMaterial'] is defined %}
                <p>{{ formula['rawMaterial'] }}</p>
                {% elseif formula['intermediate'] is defined %}
                <p>{{ formula['intermediate'] }}</p>
                {% else %}
                <p>{{ formula['intermediate'] }} - {{ formula['rawMaterial'] }}</p>
                {% endif %}
                <p>{{ formula['amount'] }} %</p>
            </div>
            {% else %}
            <div class="property-row">
                <p class="single">There is no formula listed</p>
            </div>
            {% endfor %}
    </div>
    
    <div class="row-cont no-brd">
        <h3 class="ven-label">Other Informations:</h3>
        <div class="row">
            <p class="left-side">Reason for change: {{ finishedProduct['reasonForChange'] }}</p>
            <p class="left-side">Amount in stock: {{ finishedProduct['amountInStock'] }}</p>
            <p class="left-side">Amount on Sales Order: {{ finishedProduct['amountInPurchaseOrder'] }} </p>
            <p class="left-side">Recommended Stock Level: {{ finishedProduct['reorderPoint'] }}</p>            
        </div> 
    </div>
    
</div>

{% endblock %} 
